// indexHTML
var HOST = 'http://localhost:3000';
var CSS_LINK_TAB = `
  <link rel="stylesheet" type="text/css" href="${HOST}/styles/main.css">
`;
var BAIDU_DATA = '';
if (process.env.NODE_ENV === 'production') {
  HOST = 'http://www.imlooke.com';
  CSS_LINK_TAB = `
    <link rel="stylesheet" type="text/css" href="${HOST}/styles/main.min.css">
  `;
  BAIDU_DATA = `
    <!-- 百度统计 -->
    <script>
      var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?206e1fc63436fabf5e96e7f667c020bc";
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
  `;
}

const title = '大橙子imlooke - 参与有趣的活动，寻找兴趣相投的小伙伴!';

const description = 'imlooke.com - 大橙子为兴趣相投和有社交需求的大学生提供了综合性的交流平台。在这里你可以自由的发布和发现活动，寻找志同道合的小伙伴，与好友快意聊天，在活动中分享你的惊喜与欢乐。';

const keywords = '大学生活动,兴趣,party';

exports = module.exports = function(renderHtml = '') {
const html = `
<!doctype html>
<html class="no-js" lang="">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <title>大橙子Imlooke - 参与有趣的活动，寻找兴趣相投的小伙伴!</title>
  <meta name="description" content="${description}">
  <meta name="keywords" content="${keywords}" />
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1, minimum-scale=1">
  
  ${CSS_LINK_TAB}

  ${BAIDU_DATA}
</head>

<body>
  <div id="app">${renderHtml}</div>
  
  <script src="${HOST}/app.js"></script>
</body>

</html>
`;
  return html;
};

/**
initialState
<script>
  window.__INITIAL_STATE__ = ${JSON.stringify(initialState)}
</script>
 */